luci-app-watchcat: allow multiple IP addresses in ping hosts field
authorIvan Diaz <[email protected]>
Wed, 15 Oct 2025 02:10:57 +0000 (21:10 -0500)
committerPaul Donald <[email protected]>
Tue, 9 Dec 2025 17:18:42 +0000 (18:18 +0100)
The watchcat backend supports multiple hosts but the UI was limited to single entry. Changed datatype from 'host' to 'list(host)' to accept space-separated IP addresses.

Signed-off-by: Ivan Diaz <[email protected]>
applications/luci-app-watchcat/htdocs/luci-static/resources/view/watchcat.js

index b357db2a4c7506865978b162d96c0492383c04d7..a6c49501d2de41aa9a9ebb3b3ba4ffb801241ada 100644 (file)
@@ -49,9 +49,9 @@ return view.extend({
                                1 hour would be: <b>1h</b></li><li>1 week would be: <b>7d</b></li><ul>"));
                o.default = '6h';
 
-               o = s.taboption('general', form.Value, 'pinghosts', _('Host To Check'), _(`IP address or hostname to ping.`));
-               o.datatype = 'host';
-               o.default = '8.8.8.8';
+               o = s.taboption('general', form.Value, 'pinghosts', _('Host To Check'), _(`IP addresses or hostnames to ping.`));
+               o.datatype = 'list(host)';
+               o.default = '8.8.8.8 1.1.1.1';
                o.depends({ mode: "ping_reboot" });
                o.depends({ mode: "restart_iface" });
                o.depends({ mode: "run_script" });